package o;

import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.appgallery.foundation.ui.framework.activity.AbstractBaseActivity;
import com.huawei.hms.support.api.entity.pay.HwPayConstant;
import java.util.LinkedHashMap;

public class egn implements egr$b, egq$b {
    private static egn ˊ;
    private egq ˋ;
    private d ˏ;
    private egr ॱ;

    public static synchronized egn ˎ() {
        egn o_egn;
        synchronized (egn.class) {
            if (ˊ == null) {
                ˊ = new egn();
            }
            o_egn = ˊ;
        }
        return o_egn;
    }

    public void ˊ() {
        cvt o_ega = new ega();
        if (this.ॱ != null) {
            this.ॱ.ˊ();
        }
        this.ॱ = new egr(this);
        cfw.ˎ(o_ega, this.ॱ);
    }

    public void ˊ(int i, d dVar) {
        this.ˏ = dVar;
        cvt o_egb = eqp.ᐝ() ? new egb(i) : new egc(i);
        if (this.ˋ != null) {
            this.ˋ.ॱ();
        }
        this.ˋ = new egq(this);
        cfw.ˎ(o_egb, this.ˋ);
    }

    public void ॱ() {
        cfw.ˋ();
        ceo.ˎ().ˋ();
    }

    public void ˏ() {
        this.ˏ = null;
    }

    public void ˏ(int i, boolean z) {
        ceo.ˎ().ˎ(i);
        ceo.ˎ().ˊ(z);
        this.ॱ = null;
    }

    public void ˎ(int i, boolean z, int i2) {
        if (z) {
            cfw.ˋ();
            ceo.ˎ().ˎ(i);
            ˏ(i);
        }
        if (this.ˏ != null) {
            this.ˏ.ˏ(i2);
        }
        this.ˋ = null;
    }

    private void ˏ(int i) {
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        linkedHashMap.put("recommendSwitch", String.valueOf(i));
        linkedHashMap.put(HwPayConstant.KEY_COUNTRY, eqp.ॱ());
        linkedHashMap.put("userID", UserSession.getInstance().getUserId());
        linkedHashMap.put("service_type", String.valueOf(dgm.ˎ(AbstractBaseActivity.ʻॱ())));
        dgh.ˋ("131302", linkedHashMap);
    }
}
